import request from '/@/utils/request';
/**
 * @method adminLogin 用户登录
 */
export const loginApi = () => {
	return {
		login: (params?: object) => {
			return request({
				url: '/admin/login',
				method: 'post',
				data: params,
			});
		},
	};
};
/**
 * @method adminLogin 用户登录
 * @method configSystem 保存基本配置
 * @method configSystemSelect 单个系统配置信息
 */
export const systemApi = () => {
	return {
		tencentCosTmp: (params?: object) => {
			return request({
				url: '/system/tencent_cos_tmp',
				method: 'post',
				data: params,
			});
		},
		configSystem: (params?: object) => {
			return request({
				url: '/admin/config_system',
				method: 'post',
				data: params,
			});
		},
		configSystemSelect: (params?: object) => {
			return request({
				url: '/system/config_system_select',
				method: 'get',
				params: params,
			});
		},
	};
};
/**
 * @method goodsList 商品列表
 * @method goodsAdd 添加商品
 * @method goodsEdit 编辑商品
 * @method goodsEditSku 编辑商品sku
 * @method goodsEditStock 加或减库存
 * @method goodsEditVirtualSales 加或减销量
 * @method goodsEditStatus 商品上下架
 * @method goodsSelect 查询商品详情
 * @method goodsSelectSku 查询商品详情  sku
 * @method goodsSelectClass 选择商品分类
 * @method goodsSelectSupplier 选择供应商
 * @method goodsSelectGoodsBrand 选择商品品牌
 * @method goodsSelectFreightTemplate 选择运费模板
 * @method goodsSelectSupplierAddress 选择供应商退换货地址
 * @method goodsListWarning 查询预警商品
 * @method goodsChangePriceList 商品改价记录
 * @method goodsChangePriceAdd 添加商品改价
 */
export const goodsApi = () => {
	return {
		goodsList: (params?: object) => {
			return request({
				url: '/admin/goods_list',
				method: 'get',
				params: params,
			});
		},
		goodsAdd: (params?: object) => {
			return request({
				url: '/admin/goods_add',
				method: 'post',
				data: params,
			});
		},
		goodsEdit: (params?: object) => {
			return request({
				url: '/admin/goods_edit',
				method: 'post',
				data: params,
			});
		},
		goodsEditSku: (params?: object) => {
			return request({
				url: '/admin/goods_edit_sku',
				method: 'post',
				data: params,
			});
		},
		goodsEditStock: (params?: object) => {
			return request({
				url: '/admin/goods_edit_stock',
				method: 'post',
				data: params,
			});
		},
		goodsEditVirtualSales: (params?: object) => {
			return request({
				url: '/admin/goods_edit_virtual_sales',
				method: 'post',
				data: params,
			});
		},
		goodsEditStatus: (params?: object) => {
			return request({
				url: '/admin/goods_edit_status',
				method: 'post',
				data: params,
			});
		},
		goodsSelect: (params?: object) => {
			return request({
				url: '/admin/goods_select',
				method: 'get',
				params: params,
			});
		},
		goodsSelectSku: (params?: object) => {
			return request({
				url: '/admin/goods_select_sku',
				method: 'get',
				params: params,
			});
		},
		goodsSelectClass: (params?: object) => {
			return request({
				url: '/admin/goods_select_class',
				method: 'get',
				params: params,
			});
		},
		goodsSelectSupplier: (params?: object) => {
			return request({
				url: '/admin/goods_select_supplier',
				method: 'get',
				params: params,
			});
		},
		goodsSelectGoodsBrand: (params?: object) => {
			return request({
				url: '/admin/goods_select_goods_brand',
				method: 'get',
				params: params,
			});
		},
		goodsSelectFreightTemplate: (params?: object) => {
			return request({
				url: '/admin/goods_select_freight_template',
				method: 'get',
				params: params,
			});
		},
		goodsSelectSupplierAddress: (params?: object) => {
			return request({
				url: '/admin/goods_select_supplier_address',
				method: 'get',
				params: params,
			});
		},
		goodsListWarning: (params?: object) => {
			return request({
				url: '/admin/goods_list_warning',
				method: 'get',
				params: params,
			});
		},
		goodsChangePriceList: (params?: object) => {
			return request({
				url: '/admin/goods_change_price_list',
				method: 'get',
				params: params,
			});
		},
		goodsChangePriceAdd: (params?: object) => {
			return request({
				url: '/admin/goods_change_price_add',
				method: 'post',
				data: params,
			});
		},
	};
};
/**
 * @method goodsUserList 用户列表
 * @method goodsEvaluateList 评论列表
 * @method goodsEvaluateMiddleNot 待选商品
 * @method goodsEvaluateMiddle 已选商品
 * @method goodsEvaluateAdd 添加评论
 * @method goodsEvaluateEdit 编辑评论
 * @method goodsEvaluateDelete 删除评论
 * @method goodsEvaluateAllocation 分配商品
 * @method goodsEvaluateAllocationDelete 删除商品
 */
export const goodsEvaluateApi = () => {
	return {
		goodsUserList: (params?: object) => {
			return request({
				url: '/admin/goods_users_list',
				method: 'get',
				params: params,
			});
		},
		goodsEvaluateList: (params?: object) => {
			return request({
				url: '/admin/goods_evaluate_list',
				method: 'get',
				params: params,
			});
		},
		goodsEvaluateMiddleNot: (params?: object) => {
			return request({
				url: '/admin/goods_evaluate_middle_not',
				method: 'get',
				params: params,
			});
		},
		goodsEvaluateMiddle: (params?: object) => {
			return request({
				url: '/admin/goods_evaluate_middle',
				method: 'get',
				params: params,
			});
		},
		goodsEvaluateAdd: (params?: object) => {
			return request({
				url: '/admin/goods_evaluate_add',
				method: 'post',
				data: params,
			});
		},
		goodsEvaluateEdit: (params?: object) => {
			return request({
				url: '/admin/goods_evaluate_edit',
				method: 'post',
				data: params,
			});
		},
		goodsEvaluateDelete: (params?: object) => {
			return request({
				url: '/admin/goods_evaluate_delete',
				method: 'post',
				data: params,
			});
		},
		goodsEvaluateAllocation: (params?: object) => {
			return request({
				url: '/admin/goods_evaluate_allocation',
				method: 'post',
				data: params,
			});
		},
		goodsEvaluateAllocationDelete: (params?: object) => {
			return request({
				url: '/admin/goods_evaluate_allocation_delete',
				method: 'post',
				data: params,
			});
		},
	};
};
/**
 * @method freightTemplateList 运费模板列表
 * @method freightTemplateAdd 添加运费模板
 * @method freightTemplateEdit 編輯运费模板
 * @method freightTemplateDelete 删除运费模板
 * @method freightTemplateInfo 获取运费模板信息
 * @method freightTemplateNotSendList 运费模板不配送区域列表
 * @method freightTemplateNotSendAdd 添加运费模板不配送区域
 * @method freightTemplateNotSendEdit 編輯运费模板不配送区域
 * @method freightTemplateNotSendDelete 删除运费模板不配送区域
 * @method freightTemplateNotSendInfo 获取运费模板不配送区域信息
 * @method freightTemplateNotMailList 运费模板不包邮区域列表
 * @method freightTemplateNotMailAdd 添加运费模板不包邮区域
 * @method freightTemplateNotMailEdit 編輯运费模板不包邮区域
 * @method freightTemplateNotMailDelete 删除运费模板不包邮区域
 * @method freightTemplateNotMailInfo 获取运费模板不包邮区域信息
 */
export const freightTemplateApi = () => {
	return {
		freightTemplateList: (params?: object) => {
			return request({
				url: '/admin/freight_template_list',
				method: 'get',
				params: params,
			});
		},
		freightTemplateAdd: (params?: object) => {
			return request({
				url: '/admin/freight_template_add',
				method: 'post',
				data: params,
			});
		},
		freightTemplateEdit: (params?: object) => {
			return request({
				url: '/admin/freight_template_edit',
				method: 'post',
				data: params,
			});
		},
		freightTemplateDelete: (params?: object) => {
			return request({
				url: '/admin/freight_template_delete',
				method: 'post',
				data: params,
			});
		},
		freightTemplateInfo: (params?: object) => {
			return request({
				url: '/admin/freight_template_info',
				method: 'get',
				params: params,
			});
		},
		freightTemplateNotSendList: (params?: object) => {
			return request({
				url: '/admin/freight_template_not_send_list',
				method: 'get',
				params: params,
			});
		},
		freightTemplateNotSendAdd: (params?: object) => {
			return request({
				url: '/admin/freight_template_not_send_add',
				method: 'post',
				data: params,
			});
		},
		freightTemplateNotSendEdit: (params?: object) => {
			return request({
				url: '/admin/freight_template_not_send_edit',
				method: 'post',
				data: params,
			});
		},
		freightTemplateNotSendDelete: (params?: object) => {
			return request({
				url: '/admin/freight_template_not_send_delete',
				method: 'post',
				data: params,
			});
		},
		freightTemplateNotSendInfo: (params?: object) => {
			return request({
				url: '/admin/freight_template_not_send_info',
				method: 'get',
				params: params,
			});
		},
		freightTemplateNotMailList: (params?: object) => {
			return request({
				url: '/admin/freight_template_not_mail_list',
				method: 'get',
				params: params,
			});
		},
		freightTemplateNotMailAdd: (params?: object) => {
			return request({
				url: '/admin/freight_template_not_mail_add',
				method: 'post',
				data: params,
			});
		},
		freightTemplateNotMailEdit: (params?: object) => {
			return request({
				url: '/admin/freight_template_not_mail_edit',
				method: 'post',
				data: params,
			});
		},
		freightTemplateNotMailDelete: (params?: object) => {
			return request({
				url: '/admin/freight_template_not_mail_delete',
				method: 'post',
				data: params,
			});
		},
		freightTemplateNotMailInfo: (params?: object) => {
			return request({
				url: '/admin/freight_template_not_mail_info',
				method: 'get',
				params: params,
			});
		},
	};
};
/**
 * @method goodsClassList 商品分类列表
 * @method goodsClassAdd 添加商品分类
 * @method goodsClassEdit 编辑商品分类
 * @method goodsClassInfo 获取商品分类信息
 * @method goodsClassDelete 删除商品分类
 */
export const goodsClassApi = () => {
	return {
		goodsClassList: (params?: object) => {
			return request({
				url: '/admin/goods_class_list',
				method: 'get',
				params: params,
			});
		},
		goodsClassAdd: (params?: object) => {
			return request({
				url: '/admin/goods_class_add',
				method: 'post',
				data: params,
			});
		},
		goodsClassEdit: (params?: object) => {
			return request({
				url: '/admin/goods_class_edit',
				method: 'post',
				data: params,
			});
		},
		goodsClassInfo: (params?: object) => {
			return request({
				url: '/admin/goods_class_info',
				method: 'get',
				params: params,
			});
		},
		goodsClassDelete: (params?: object) => {
			return request({
				url: '/admin/goods_class_delete',
				method: 'post',
				data: params,
			});
		},
	};
};
/**
 * @method goodsBrandList 商品品牌列表
 * @method goodsBrandAdd 添加商品品牌
 * @method goodsBrandEdit 编辑商品品牌
 * @method goodsBrandInfo 获取商品品牌信息
 * @method goodsBrandDelete 删除商品品牌
 */
export const goodsBrandApi = () => {
	return {
		goodsBrandList: (params?: object) => {
			return request({
				url: '/admin/goods_brand_list',
				method: 'get',
				params: params,
			});
		},
		goodsBrandAdd: (params?: object) => {
			return request({
				url: '/admin/goods_brand_add',
				method: 'post',
				data: params,
			});
		},
		goodsBrandEdit: (params?: object) => {
			return request({
				url: '/admin/goods_brand_edit',
				method: 'post',
				data: params,
			});
		},
		goodsBrandInfo: (params?: object) => {
			return request({
				url: '/admin/goods_brand_info',
				method: 'get',
				params: params,
			});
		},
		goodsBrandDelete: (params?: object) => {
			return request({
				url: '/admin/goods_brand_delete',
				method: 'post',
				data: params,
			});
		},
	};
};
/**
 * @method goodsTagsList 商品标签列表
 * @method goodsTagsAdd 添加商品标签
 * @method goodsTagsEdit 编辑商品标签
 * @method goodsTagsInfo 获取商品标签信息
 * @method goodsTagsDelete 删除商品标签
 * @method goodsTagsBindGoodsList 标签已绑定的商品列表
 * @method goodsTagsNotBindGoodsList 标签未绑定的商品列表
 * @method goodsTagsBindGoods 分配商品
 * @method goodsTagsBindGoodsDelete 移除分配商品
 */
export const goodsTagsApi = () => {
	return {
		goodsTagsList: (params?: object) => {
			return request({
				url: '/admin/goods_tags_list',
				method: 'get',
				params: params,
			});
		},
		goodsTagsAdd: (params?: object) => {
			return request({
				url: '/admin/goods_tags_add',
				method: 'post',
				data: params,
			});
		},
		goodsTagsEdit: (params?: object) => {
			return request({
				url: '/admin/goods_tags_edit',
				method: 'post',
				data: params,
			});
		},
		goodsTagsInfo: (params?: object) => {
			return request({
				url: '/admin/goods_tags_info',
				method: 'get',
				params: params,
			});
		},
		goodsTagsDelete: (params?: object) => {
			return request({
				url: '/admin/goods_tags_delete',
				method: 'post',
				data: params,
			});
		},
		goodsTagsBindGoodsList: (params?: object) => {
			return request({
				url: '/admin/goods_tags_bind_goods_list',
				method: 'get',
				params: params,
			});
		},
		goodsTagsNotBindGoodsList: (params?: object) => {
			return request({
				url: '/admin/goods_tags_not_bind_goods_list',
				method: 'get',
				params: params,
			});
		},
		goodsTagsBindGoods: (params?: object) => {
			return request({
				url: '/admin/goods_tags_bind_goods',
				method: 'post',
				data: params,
			});
		},
		goodsTagsBindGoodsDelete: (params?: object) => {
			return request({
				url: '/admin/goods_tags_bind_goods_delete',
				method: 'post',
				data: params,
			});
		},
	};
};
/**
 * @method supplierList 供应商列表
 * @method supplierAdd 添加供应商
 * @method supplierEdit 编辑供应商
 * @method supplierResetPassword 重置密码
 * @method supplierDelete 删除供应商
 * @method supplierInfo 获取供应商信息
 * @method supplierAddressList 供应商退货地址列表
 * @method supplierAddressAdd 添加供应商退货地址
 * @method supplierAddressEdit 编辑供应商退货地址
 * @method supplierAddressDelete 删除供应商退货地址
 * @method supplierAddressInfo 获取供应商退货地址信息
 */
export const supplierApi = () => {
	return {
		supplierList: (params?: object) => {
			return request({
				url: '/admin/supplier_list',
				method: 'get',
				params: params,
			});
		},
		supplierAdd: (params?: object) => {
			return request({
				url: '/admin/supplier_add',
				method: 'post',
				data: params,
			});
		},
		supplierEdit: (params?: object) => {
			return request({
				url: '/admin/supplier_edit',
				method: 'post',
				data: params,
			});
		},
		supplierResetPassword: (params?: object) => {
			return request({
				url: '/admin/supplier_reset_password',
				method: 'post',
				data: params,
			});
		},
		supplierDelete: (params?: object) => {
			return request({
				url: '/admin/supplier_delete',
				method: 'post',
				data: params,
			});
		},
		supplierInfo: (params?: object) => {
			return request({
				url: '/admin/supplier_info',
				method: 'get',
				params: params,
			});
		},
		supplierAddressList: (params?: object) => {
			return request({
				url: '/admin/supplier_address_list',
				method: 'get',
				params: params,
			});
		},
		supplierAddressAdd: (params?: object) => {
			return request({
				url: '/admin/supplier_address_add',
				method: 'post',
				data: params,
			});
		},
		supplierAddressEdit: (params?: object) => {
			return request({
				url: '/admin/supplier_address_edit',
				method: 'post',
				data: params,
			});
		},
		supplierAddressDelete: (params?: object) => {
			return request({
				url: '/admin/supplier_address_delete',
				method: 'post',
				data: params,
			});
		},
		supplierAddressInfo: (params?: object) => {
			return request({
				url: '/admin/supplier_address_info',
				method: 'get',
				params: params,
			});
		},
	};
};
/**
 * @method langList 语言列表
 * @method langAdd 添加语言
 * @method langEdit 编辑语言
 * @method langInfo 获取语言信息
 * @method langDelete 删除语言
 * @method langGoodsEdit 商品相关单个翻译保存
 * @method langSystemEdit 系统相关单个翻译保存
 * @method langOrderEdit 订单相关单个翻译保存
 */
export const langApi = () => {
	return {
		langList: (params?: object) => {
			return request({
				url: '/admin/lang_list',
				method: 'get',
				params: params,
			});
		},
		langAdd: (params?: object) => {
			return request({
				url: '/admin/lang_add',
				method: 'post',
				data: params,
			});
		},
		langEdit: (params?: object) => {
			return request({
				url: '/admin/lang_edit',
				method: 'post',
				data: params,
			});
		},
		langInfo: (params?: object) => {
			return request({
				url: '/admin/lang_info',
				method: 'get',
				params: params,
			});
		},
		langDelete: (params?: object) => {
			return request({
				url: '/admin/lang_delete',
				method: 'post',
				data: params,
			});
		},
		langGoodsEdit: (params?: object) => {
			return request({
				url: '/admin/lang_goods_edit',
				method: 'post',
				data: params,
			});
		},
		langSystemEdit: (params?: object) => {
			return request({
				url: '/admin/lang_system_edit',
				method: 'post',
				data: params,
			});
		},
		langOrderEdit: (params?: object) => {
			return request({
				url: '/admin/lang_order_edit',
				method: 'post',
				data: params,
			});
		},
	};
};
/**
 * @method areaList 国家地区列表
 * @method areaAdd 添加国家地区
 * @method areaEdit 编辑国家地区
 * @method areaInfo 获取国家地区信息
 * @method areaDelete 删除国家地区
 */
export const areaApi = () => {
	return {
		areaList: (params?: object) => {
			return request({
				url: '/admin/area_list',
				method: 'get',
				params: params,
			});
		},
		areaAdd: (params?: object) => {
			return request({
				url: '/admin/area_add',
				method: 'post',
				data: params,
			});
		},
		areaEdit: (params?: object) => {
			return request({
				url: '/admin/area_edit',
				method: 'post',
				data: params,
			});
		},
		areaInfo: (params?: object) => {
			return request({
				url: '/admin/area_info',
				method: 'get',
				params: params,
			});
		},
		areaDelete: (params?: object) => {
			return request({
				url: '/admin/area_delete',
				method: 'post',
				data: params,
			});
		},
	};
};
/**
 * @method usersList 用户列表
 * @method importUsers 导入用户
 * @method usersInfo 用户信息
 * @method teamList 我的团队
 * @method usersInviteList 可以选择成为推荐人的用户列表
 * @method usersEditInvite 修改推荐人
 * @method usersUpgradeOne 普通用户升级为铜牌会员
 * @method usersUpgradeTwo 铜牌会员升级为银牌会员
 * @method usersUpgradeThree 银牌会员升级为金牌会员
 * @method usersDemotionOne 银牌会员降级为铜牌会员
 * @method usersDemotionTow 金牌会员升级为银牌会员
 */
export const usersApi = () => {
	return {
		usersList: (params?: object) => {
			return request({
				url: '/admin/users_list',
				method: 'get',
				params: params,
			});
		},
		importUsers: () => {
			return import.meta.env.VITE_API_URL + '/admin/import_users';
		},
		usersInfo: (params?: object) => {
			return request({
				url: '/admin/users_info',
				method: 'get',
				params: params,
			});
		},
		teamList: (params?: object) => {
			return request({
				url: '/admin/team_list',
				method: 'get',
				params: params,
			});
		},
		usersInviteList: (params?: object) => {
			return request({
				url: '/admin/users_invite_list',
				method: 'get',
				params: params,
			});
		},
		usersEditInvite: (params?: object) => {
			return request({
				url: '/admin/users_edit_invite',
				method: 'post',
				data: params,
			});
		},
		usersUpgradeOne: (params?: object) => {
			return request({
				url: '/admin/users_upgrade_one',
				method: 'post',
				data: params,
			});
		},
		usersUpgradeTwo: (params?: object) => {
			return request({
				url: '/admin/users_upgrade_two',
				method: 'post',
				data: params,
			});
		},
		usersUpgradeThree: (params?: object) => {
			return request({
				url: '/admin/users_upgrade_three',
				method: 'post',
				data: params,
			});
		},
		usersDemotionOne: (params?: object) => {
			return request({
				url: '/admin/users_demotion_one',
				method: 'post',
				data: params,
			});
		},
		usersDemotionTow: (params?: object) => {
			return request({
				url: '/admin/users_demotion_two',
				method: 'post',
				data: params,
			});
		},
	};
};
/**
 * @method permissionList 权限菜单列表
 * @method permissionAdd 添加权限菜单
 * @method permissionEdit 编辑权限菜单
 * @method permissionInfo 获取权限菜单信息
 * @method permissionDelete 删除权限菜单
 */
export const permissionApi = () => {
	return {
		permissionList: (params?: object) => {
			return request({
				url: '/admin/permission_list',
				method: 'get',
				params: params,
			});
		},
		permissionAdd: (params?: object) => {
			return request({
				url: '/admin/permission_add',
				method: 'post',
				data: params,
			});
		},
		permissionEdit: (params?: object) => {
			return request({
				url: '/admin/permission_edit',
				method: 'post',
				data: params,
			});
		},
		permissionInfo: (params?: object) => {
			return request({
				url: '/admin/permission_info',
				method: 'get',
				params: params,
			});
		},
		permissionDelete: (params?: object) => {
			return request({
				url: '/admin/permission_delete',
				method: 'post',
				data: params,
			});
		},
	};
};
/**
 * @method rolesList 角色列表
 * @method rolesAdd 添加角色
 * @method rolesEdit 编辑角色
 * @method rolesInfo 获取角色信息
 * @method rolesDelete 删除角色
 * @method rolesAssignPermissions 分配菜单
 */
export const rolesApi = () => {
	return {
		rolesList: (params?: object) => {
			return request({
				url: '/admin/roles_list',
				method: 'get',
				params: params,
			});
		},
		rolesAdd: (params?: object) => {
			return request({
				url: '/admin/roles_add',
				method: 'post',
				data: params,
			});
		},
		rolesEdit: (params?: object) => {
			return request({
				url: '/admin/roles_edit',
				method: 'post',
				data: params,
			});
		},
		rolesInfo: (params?: object) => {
			return request({
				url: '/admin/roles_info',
				method: 'get',
				params: params,
			});
		},
		rolesDelete: (params?: object) => {
			return request({
				url: '/admin/roles_delete',
				method: 'post',
				data: params,
			});
		},
		rolesAssignPermissions: (params?: object) => {
			return request({
				url: '/admin/roles_assign_permissions',
				method: 'post',
				data: params,
			});
		},
	};
};
/**
 * @method adminList 管理员列表
 * @method adminAdd 添加管理员
 * @method adminEdit 编辑管理员
 * @method adminInfo 获取管理员信息
 * @method adminDelete 删除管理员
 * @method adminAssignRoles 管理员分配角色
 */
export const adminApi = () => {
	return {
		adminList: (params?: object) => {
			return request({
				url: '/admin/admin_list',
				method: 'get',
				params: params,
			});
		},
		adminAdd: (params?: object) => {
			return request({
				url: '/admin/admin_add',
				method: 'post',
				data: params,
			});
		},
		adminEdit: (params?: object) => {
			return request({
				url: '/admin/admin_edit',
				method: 'post',
				data: params,
			});
		},
		adminInfo: (params?: object) => {
			return request({
				url: '/admin/admin_info',
				method: 'get',
				params: params,
			});
		},
		adminDelete: (params?: object) => {
			return request({
				url: '/admin/admin_delete',
				method: 'post',
				data: params,
			});
		},
		adminAssignRoles: (params?: object) => {
			return request({
				url: '/admin/admin_assign_roles',
				method: 'post',
				data: params,
			});
		},
	};
};
/**
 * @method bannerList 轮播图列表
 * @method bannerAdd 添加轮播图
 * @method bannerEdit 编辑轮播图
 * @method bannerInfo 获取轮播图信息
 * @method bannerDelete 删除轮播图
 */
export const bannerApi = () => {
	return {
		bannerList: (params?: object) => {
			return request({
				url: '/admin/banner_list',
				method: 'get',
				params: params,
			});
		},
		bannerAdd: (params?: object) => {
			return request({
				url: '/admin/banner_add',
				method: 'post',
				data: params,
			});
		},
		bannerEdit: (params?: object) => {
			return request({
				url: '/admin/banner_edit',
				method: 'post',
				data: params,
			});
		},
		bannerInfo: (params?: object) => {
			return request({
				url: '/admin/banner_info',
				method: 'get',
				params: params,
			});
		},
		bannerDelete: (params?: object) => {
			return request({
				url: '/admin/banner_delete',
				method: 'post',
				data: params,
			});
		},
	};
};
/**
 * @method logisticsList 物流公司列表
 * @method logisticsAdd 添加物流公司
 * @method logisticsEdit 编辑物流公司
 * @method logisticsInfo 获取物流公司信息
 * @method logisticsDelete 删除物流公司
 */
export const logisticsApi = () => {
	return {
		logisticsList: (params?: object) => {
			return request({
				url: '/admin/logistics_list',
				method: 'get',
				params: params,
			});
		},
		logisticsAdd: (params?: object) => {
			return request({
				url: '/admin/logistics_add',
				method: 'post',
				data: params,
			});
		},
		logisticsEdit: (params?: object) => {
			return request({
				url: '/admin/logistics_edit',
				method: 'post',
				data: params,
			});
		},
		logisticsInfo: (params?: object) => {
			return request({
				url: '/admin/logistics_info',
				method: 'get',
				params: params,
			});
		},
		logisticsDelete: (params?: object) => {
			return request({
				url: '/admin/logistics_delete',
				method: 'post',
				data: params,
			});
		},
	};
};
/**
 * @method orderList 订单列表
 * @method orderCancel 取消订单
 * @method orderReceipt 确认收货
 * @method exportFinance 导出订单
 * @method orderExportInfo 导出财务订单文件
 * @method orderExportInfoNew 导出待发货订单(新)
 * @method orderDeliver 单个发货
 * @method orderDeliverNew 单个发货(新)
 * @method orderImport 批量发货
 * @method orderExportFileList 导出订单记录
 * @method orderFileList 导入待发货订单记录
 * @method importFileOrderList 导入待发货文件的订单列表
 * @method orderAfterList 售后列表
 * @method orderAfterApply 发货前退款
 * @method orderAfterOneCheck 售后一审
 * @method orderAfterTwoCheck 售后二审
 * @method orderAfterRemark 添加备注
 * @method orderAfterInfo 售后详情信息
 * @method orderAfterLog 售后进度
 * @method orderAfterLogDetail 售后进度详情
 */
export const orderApi = () => {
	return {
		orderList: (params?: object) => {
			return request({
				url: '/admin/order_list',
				method: 'get',
				params: params,
			});
		},
		orderCancel: (params?: object) => {
			return request({
				url: '/admin/order_cancel',
				method: 'post',
				data: params,
			});
		},
		orderReceipt: (params?: object) => {
			return request({
				url: '/admin/order_receipt',
				method: 'post',
				data: params,
			});
		},
		exportFinance: (params?: object) => {
			return request({
				url: '/admin/export_finance',
				method: 'get',
				params: params,
			});
		},
		orderExportInfo: (params?: object) => {
			return request({
				url: '/admin/order_export_info',
				method: 'get',
				params: params,
			});
		},
		orderExportInfoNew: (params?: object) => {
			return request({
				url: '/admin/order_export_info_new',
				method: 'get',
				params: params,
			});
		},
		orderExportFileList: (params?: object) => {
			return request({
				url: '/admin/order_export_file_list',
				method: 'get',
				params: params,
			});
		},
		orderDeliver: (params?: object) => {
			return request({
				url: '/admin/order_deliver',
				method: 'post',
				data: params,
			});
		},
		orderDeliverNew: (params?: object) => {
			return request({
				url: '/admin/order_deliver_new',
				method: 'post',
				data: params,
			});
		},
		orderImport: () => {
			return import.meta.env.VITE_API_URL + '/admin/order_import';
		},
		orderFileList: (params?: object) => {
			return request({
				url: '/admin/import_file_list',
				method: 'get',
				params: params,
			});
		},
		importFileOrderList: (params?: object) => {
			return request({
				url: '/admin/import_file_order_list',
				method: 'get',
				params: params,
			});
		},
		orderAfterList: (params?: object) => {
			return request({
				url: '/admin/order_after_list',
				method: 'get',
				params: params,
			});
		},
		orderAfterApply: (params?: object) => {
			return request({
				url: '/admin/order_after_apply',
				method: 'post',
				data: params,
			});
		},
		orderAfterOneCheck: (params?: object) => {
			return request({
				url: '/admin/order_after_one_check',
				method: 'post',
				data: params,
			});
		},
		orderAfterTwoCheck: (params?: object) => {
			return request({
				url: '/admin/order_after_two_check',
				method: 'post',
				data: params,
			});
		},
		orderAfterRemark: (params?: object) => {
			return request({
				url: '/admin/order_after_remark',
				method: 'post',
				data: params,
			});
		},
		orderAfterInfo: (params?: object) => {
			return request({
				url: '/admin/order_after_info',
				method: 'get',
				params: params,
			});
		},
		orderAfterLog: (params?: object) => {
			return request({
				url: '/admin/order_after_log',
				method: 'get',
				params: params,
			});
		},
		orderAfterLogDetail: (params?: object) => {
			return request({
				url: '/admin/order_after_log_detail',
				method: 'get',
				params: params,
			});
		},
	};
};
/**
 * @method supplierWithdrawalList 初审列表
 * @method supplierWithdrawalNum 查询列表数量
 * @method supplierBillDetails 账单详情（待审核/待打款/已打款）
 * @method supplierBillDetailsRefuse 账单详情（已拒绝）
 * @method supplierWithdrawalCheck 初审审核
 * @method supplierWithdrawalPaymentList 打款列表
 * @method supplierWithdrawalPayment 打款审核
 * @method orderAfterInfo 售后详情信息
 * @method withdrawalOrderAfterLog 售后记录
 */
export const supplierWithdrawalApi = () => {
	return {
		supplierWithdrawalList: (params?: object) => {
			return request({
				url: '/admin/supplier_withdrawal_list',
				method: 'get',
				params: params,
			});
		},
		supplierWithdrawalNum: (params?: object) => {
			return request({
				url: '/admin/supplier_withdrawal_num',
				method: 'get',
				params: params,
			});
		},
		supplierBillDetails: (params?: object) => {
			return request({
				url: '/admin/supplier_bill_details',
				method: 'get',
				params: params,
			});
		},
		supplierBillDetailsRefuse: (params?: object) => {
			return request({
				url: '/admin/supplier_bill_details_refuse',
				method: 'get',
				params: params,
			});
		},
		supplierWithdrawalCheck: (params?: object) => {
			return request({
				url: '/admin/supplier_withdrawal_check',
				method: 'post',
				data: params,
			});
		},
		supplierWithdrawalPaymentList: (params?: object) => {
			return request({
				url: '/admin/supplier_withdrawal_payment_list',
				method: 'get',
				params: params,
			});
		},
		supplierWithdrawalPayment: (params?: object) => {
			return request({
				url: '/admin/supplier_withdrawal_payment',
				method: 'post',
				data: params,
			});
		},
		orderAfterInfo: (params?: object) => {
			return request({
				url: '/admin/order_after_info',
				method: 'get',
				params: params,
			});
		},
		withdrawalOrderAfterLog: (params?: object) => {
			return request({
				url: '/admin/withdrawal_order_after_log',
				method: 'get',
				params: params,
			});
		},
	};
};

/**
 * 用户财务
 * @method usersWithdrawList 用户提现列表
 * @method usersWithdrawCheck 用户提现审核
 * @method usersWithdrawRemit 用户提现打款
 *
 *
 */
export const userWithdrawalApi = () => {
	return {
		usersWithdrawList: (params?: object) => {
			return request({
				url: '/admin/users_withdraw_list',
				method: 'get',
				params: params,
			});
		},
		usersWithdrawCheck: (params?: object) => {
			return request({
				url: '/admin/users_withdraw_check',
				method: 'post',
				data: params,
			});
		},
		usersWithdrawRemit: (params?: object) => {
			return request({
				url: '/admin/users_withdraw_remit',
				method: 'post',
				data: params,
			});
		},
	};
};
/**
 * @method indexStatistics 首页统计信息
 * @method orderStatistics 订单统计
 * @method daysStatistics 每日统计
 * @method goodsStatistics 商品统计
 */
export const statisticsApi = () => {
	return {
		indexStatistics: (params?: object) => {
			return request({
				url: '/admin/index_statistics',
				method: 'get',
				params: params,
			});
		},
		orderStatistics: (params?: object) => {
			return request({
				url: '/admin/order_statistics',
				method: 'get',
				params: params,
			});
		},
		daysStatistics: (params?: object) => {
			return request({
				url: '/admin/days_statistics',
				method: 'get',
				params: params,
			});
		},
		goodsStatistics: (params?: object) => {
			return request({
				url: '/admin/goods_statistics',
				method: 'get',
				params: params,
			});
		},
	};
};
/**
 */
export const system1Api = () => {
	return {};
};

/**
 * 通知管理接口
 * @method systemAnnouncementList 系统公告列表
 * @method systemAnnouncementAdd 添加系统公告
 * @method systemAnnouncementEdit 编辑系统公告
 * @method systemAnnouncementRelease 发布
 * @method systemAnnouncementDelete 删除
 * @method systemAnnouncementUsersRead 已读用户
 *
 */
export const announcementApi = () => {
	return {
		systemAnnouncementList: (params?: object) => {
			return request({
				url: '/admin/system_announcement_list',
				method: 'get',
				params: params,
			});
		},
		systemAnnouncementAdd: (params?: object) => {
			return request({
				url: '/admin/system_announcement_add',
				method: 'post',
				data: params,
			});
		},
		systemAnnouncementEdit: (params?: object) => {
			return request({
				url: '/admin/system_announcement_edit',
				method: 'post',
				data: params,
			});
		},
		systemAnnouncementRelease: (params?: object) => {
			return request({
				url: '/admin/system_announcement_release',
				method: 'post',
				data: params,
			});
		},
		systemAnnouncementDelete: (params?: object) => {
			return request({
				url: '/admin/system_announcement_delete',
				method: 'post',
				data: params,
			});
		},
		systemAnnouncementUsersRead: (params?: object) => {
			return request({
				url: '/admin/system_announcement_users_read',
				method: 'get',
				params: params,
			});
		},
	};
};
